<?php
function test($astr){
	$str = $astr;
	$len = strlen($str);
	echo $len;
	$bit = 0;
	for($i = 0;$i < $len;$i++){
		$index = ord($astr[$i]) - ord('a');
		echo $index."<br/>";
		$newBit = 1 << $index;
		if(($bit & $newBit) == $newBit){
			return false;
		}
		$bit |= $newBit;
	}
	return true;
}
var_dump(test('aa'));



